package com.tencent.www.test1;

public class Object {
    public static void main(String[] args){

        //二维数组静态初始化
//        int [][] arr ={{22,66,44},{77,33,88},{25,45,65},{11,66,99}};
//        int sum=0;
//        for (int i = 0; i < arr.length; i++) {
//            int []tmp=arr[i];
//            int a=GetSum(tmp);
//            System.out.println("第"+(i+1)+"个月份的营业额为"+a);
//            sum+=a;
//        }
//        System.out.println("总营业额为"+sum);

        //二维数组动态初始化
//        int[][]arr=new int[2][];
//        int arr1[]={1,2,3,4};
//        int arr2[]={5,6,7};
//        arr[0]=arr1;
//        arr[1]=arr2;



    }
    public static int GetSum(int []arr){
        int sum=0;
        for (int j : arr) {
            sum += j;
        }
        return sum;
    }

}
